<script setup lang="ts">
import type { MsgTable } from '@/types/msg'
import { dateFormat } from '@/util/dict'
import { authXSS } from '@/util/token'
defineProps<{
  dMap: Map<string, string>
  item: MsgTable
}>()
</script>
<template>
  <div class="page-root">
    <el-scrollbar height="60vh">
      <el-descriptions direction="vertical" :title="item.title" :column="2">
        <el-descriptions-item :label="(dMap.get('send') || 'send') + '：'" :span="1">
          <span class="highlight-info">{{ item.send }}</span>
        </el-descriptions-item>
        <el-descriptions-item :label="(dMap.get('time') || 'time') + '：'" :span="1">
          <span class="highlight-success">{{ dateFormat(item.time!) }}</span>
        </el-descriptions-item>
        <el-descriptions-item :label="(dMap.get('msg') || 'msg') + '：'" :span="2">
          <div v-html="authXSS(item.msg!)"></div>
        </el-descriptions-item>
      </el-descriptions>
    </el-scrollbar>
  </div>
</template>
<style scoped lang="less"></style>
